package com.bjpowernode.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
@RequestMapping("/login")
public class LoginCotroller {

    @RequestMapping(value = "login")
    public String loginForm(){
        return "/login/login";
    }


    @RequestMapping(value = "index",method = RequestMethod.POST)
    public String loginAction(String username, String password, Model model){
        username+="hzj";
        password+="AAA";
        model.addAttribute("username",username);
        model.addAttribute("password",password);
        return "/login/index";
    }
}
